﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BLL;
using DAL;
using DACNPM.ReportFile;

namespace DACNPM.MyUserControl.UCHienThi
{
    public partial class UCThongKeHangBanKhongChay : UserControl
    {
        Thongke2BUO tk2BUO = new Thongke2BUO();

        public UCThongKeHangBanKhongChay()
        {
            InitializeComponent();
        }

        private void btnXem_Click(object sender, EventArgs e)
        {
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource = tk2BUO.HienThiHangBanKhongChay(DateTime.Parse(dateTimePicker1.Text), DateTime.Parse(dateTimePicker2.Text));
            
        }

        private void btnIn_Click(object sender, EventArgs e)
        {
            ThongKeHangBanKhongChayReport r = new ThongKeHangBanKhongChayReport();
            r.DataSource = dataGridView1.DataSource;
            r.Load(dateTimePicker1.Text, dateTimePicker2.Text);
            r.ShowPreviewDialog();
        }
    }
}
